local skel = fk.CreateSkill {
  name = "lb_zero__mengyao_tierfeng",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable {
  ["lb_zero__mengyao_tierfeng"] = "提尔锋",
  [":lb_zero__mengyao_tierfeng"] = "<b>锁定技</b>，你使用【杀】指定目标后，其需选择一项：1.其所需抵消牌数+1；2.对其伤害+1。",

  ["#lb_zero__mengyao_tierfeng_1"] = "抵消牌数+1",
  ["#lb_zero__mengyao_tierfeng_2"] = "伤害+1",

  ["#lb_zero__mengyao_tierfeng"] = "提尔锋：请选择令你抵消 %arg 的牌数+1 或 %arg 对你伤害+1",

  ["$lb_zero__mengyao_tierfeng1"] = "",
  ["$lb_zero__mengyao_tierfeng2"] = "",
}


skel:addEffect(fk.TargetSpecified, {
  is_delay_effect = true,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and data.card.trueName == "slash" and data.to
  end,
  on_cost = function (self, event, target, player, data)
    local choice = player.room:askToChoice(data.to, {
      choices = {"#lb_zero__mengyao_tierfeng_1", "#lb_zero__mengyao_tierfeng_2"},
      skill_name = skel.name,
      prompt = "#lb_zero__mengyao_tierfeng:::" .. data.card:toLogString()
    })
    event:setCostData(self, {chioce = choice, tos = {data.to}})
    return true
  end,
  on_use = function(self, event, target, player, data)
    if event:getCostData(self).chioce == "#lb_zero__mengyao_tierfeng_1" then
      data:setResponseTimes(data:getResponseTimes() + 1)
    else
      data.additionalDamage = (data.additionalDamage or 0) + 1
    end
  end,
})

return skel
